-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix(deletions): Prevent DB call from deleting issue #95915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When deleting an issue, a failure to query the DB would prevent scheduling the group deletion task. From the customer's perspective, it would look that the group has been deleted, however, all relationships would still be left behind. The biggest problem would be that the group hashes are left behind, thus, any new events matching those group hashes would not create a new issue. This is a better fix than the one proposed in #93541. Fixes #93509. Fixes [ID-716](https://linear.app/getsentry/issue/ID-716/)
@@ -73,6 +73,9 @@ def delete_group_list( | |||
}, | |||
) | |||
|
|||
# Tell seer to delete grouping records for these groups | |||
may_schedule_task_to_delete_hashes_from_seer(error_ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this call raises an exception (as it used to do), the exception will be caught by the endpoint and return a 500.
I moved this call here because I don't want the status of the group to be changed.
I have upcoming changes to make this function clearer and more robust.
@@ -1637,23 +1638,25 @@ def test_bulk_delete_performance_issues(self): | |||
self.assert_groups_are_gone(groups) | |||
|
|||
@patch("sentry.api.helpers.group_index.delete.may_schedule_task_to_delete_hashes_from_seer") | |||
@patch("sentry.utils.audit.log_service.record_audit_log") | |||
def test_audit_log_even_if_exception_raised( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous test does not apply anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
When deleting an issue, a failure to query the DB would prevent scheduling the group deletion task. From the customer's perspective, it would look that the group has been deleted, however, all relationships would still be left behind. The biggest problem would be that the group hashes are left behind, thus, any new events matching those group hashes would not create a new issue. This is a better fix than the one proposed in #93541. Fixes #93509. Fixes [ID-716](https://linear.app/getsentry/issue/ID-716/)
When deleting an issue, a failure to query the DB would prevent scheduling the group deletion task.
From the customer's perspective, it would look that the group has been deleted, however, all relationships would still be left behind.
The biggest problem would be that the group hashes are left behind, thus, any new events matching those group hashes would not create a new issue.
This is a better fix than the one proposed in #93541.
Fixes #93509.
Fixes ID-716